<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/resrt.css">
    <link rel="stylesheet" href="../css/aside.css">
    <link rel="stylesheet" href="../iconfont/iconfont.css">
</head>
<body>
    <div class="home_tool_bar">
        <ul class="ul">
            <li>
                <a href="#" class="iconfont icon-shouji"></a>
                <div class="vx_img">
                    <img src="../img/wx-img.png" alt="">
                    <p>扫码领取新 <br>人百元礼包</p>
                </div>
            </li>
            
            <li>
                <a href="#" class="iconfont icon-wode"></a>
                <div class="bar_small">个人中心</div>
            </li>
            <li>
                <a href="#" class="iconfont icon-shezhi"></a>
                <div class="bar_small">售后服务</div>
            </li>
            <li>
                <a href="#" class="iconfont icon-lianxikefu"></a>
                <div class="bar_small">人工客服</div>
            </li>
            <li>
                <a href="#" class="iconfont icon-gouwuche2"></a>
                <div class="bar_small">购物车</div>
            </li>
        </ul>
        <div class="p_back"><img src="../img/totop.png" alt="" class="back_img"></div>
    </div>

   
    
</body>
</html>
<script src="../js/jquery.js"></script>
<script>
    $(".ul>li").on("mouseenter",function() {
      $(this).find("div").css("display", "block").siblings(".ul>li").eq(1).css("display","none")
    })
    $(".ul>li").on("mouseout",function() {
      $(this).find("div").css("display", "none");
    })


// 点击回到顶部，超过300 px 显示回到顶部模块
window.onscroll = function() {
    scrollFunction();
}
function scrollFunction() {
    if (document.body.scrollTop>500 || document.documentElement.scrollTop>500) {
        document.querySelector(".p_back").style.display="block";
    } else {
        document.querySelector(".p_back").style.display="none";
    }
}

function topFunction() {
    document.body.scrollTop=0;
    document.documentElement.scrollTop=0;
}

document.querySelector(".p_back").onclick=function() {
    topFunction()
}
</script>